import request from '/@/utils/request';
//应用验收列表--开发项目
export function checkDataList(query?: any) {
    if(query.timeArr){
        query['beginTime'] = query.timeArr[0]
        query['endTime'] = query.timeArr[1]
    }
    delete query.timeArr
    return request({
        url: 'manage/checkData/list',
        method: 'post',
        data: query,
    });
}
//应用验收列表--运维项目
export function operationList(query?: any) {
    if(query.timeArr){
        query['beginTime'] = query.timeArr[0]
        query['endTime'] = query.timeArr[1]
    }
    delete query.timeArr
    return request({
        url: 'manage/checkData/operationList ',
        method: 'post',
        data: query,
    });
}
//应用验收详情
export function checkDataDetail(query?: Object) {
    return request({
        url: 'manage/checkData/detail',
        method: 'get',
        params: query,
    });
}


//系统抽检列表
export function spotList(query?: any) {
    console.log(query)
    if(query.timeArr){
        query['beginTime'] = query.timeArr[0]
        query['endTime'] = query.timeArr[1]
        delete query.timeArr
    }
    for(let key in query){
        query[key] = query[key]||undefined
    }
    return request({
        url: 'manage/spot/list',
        method: 'post',
        data: query,
    });
}
//系统抽检意见
export function spotSave(query?: Object) {
    return request({
        url: 'manage/spot/spotSave',
        method: 'post',
        data: query,
    });
}
//系统抽检详情
export function spotDetail(query?: Object) {
    return request({
        url: 'manage/spot/detail',
        method: 'get',
        params: query,
    });
}
//保存
export function checkDataSave(query?: Object) {
    return request({
        url: 'manage/checkData/save',
        method: 'post',
        data: query,
    });
}
//应用评价列表
export function commentList(query?: any) {
    if(query.timeArr){
        query['beginTime'] = query.timeArr[0]
        query['endTime'] = query.timeArr[1]
    }
    delete query.timeArr
    return request({
        url: 'manage/comment/list',
        method: 'post',
        data: query,
    });
}

//应用评价
export function commentSave(query?: Object) {
    return request({
        url: 'manage/comment/save',
        method: 'post',
        data: query,
    });
}
//应用评价详情
export function commentDetail(query?: Object) {
    return request({
        url: 'manage/comment/detail',
        method: 'get',
        params: query,
    });
}
